package com.sjyp.cms.routes;

import com.jfinal.config.Routes;
import com.sjyp.cms.commons.interceptor.AdminInterceptor;
import com.sjyp.cms.controller.admin.*;

/**
 * 后台路由
 */
public class AdminRoutes extends Routes {

    @Override
    public void config() {
        //this.addInterceptor(new AdminSecurityInterceptor());
        //this.addInterceptor(new ExceptionAndLogInterceptor());
        this.setBaseViewPath("/pages/admin");
        this.add("/admin", LoginContrller.class, "");
        this.add("/admin/column", ColumnController.class, "");
        this.add("/admin/picture", PictureController.class, "");
        this.add("/admin/article", ArticleController.class, "");
        this.add("/admin/user", UserController.class, "");
        //权限 & 异常 & 当前菜单 拦截器
        this.addInterceptor(new AdminInterceptor());
    }


}
